from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver=webdriver.Edge()
driver.get('https://www.baidu.com/')

#点击登录
driver.find_element(By.XPATH,'//*[@id="s-top-loginbtn"]').click()
time.sleep(5)

#输入账号
driver.find_element(By.ID,'TANGRAM__PSP_11__userName').send_keys('17733058407')
time.sleep(5)

#输入密码
driver.find_element(By.NAME,'password').send_keys('Li10140910')
time.sleep(5)

#勾选协议
driver.find_element(By.XPATH,'//*[@id="TANGRAM__PSP_11__isAgree"]').click()
time.sleep(5)

#点击登录
driver.find_element(By.XPATH,'//*[@id="TANGRAM__PSP_11__submit"]').click()
time.sleep(30)